<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>DynarchMenu: timeouts</title>
    <style type="text/css"> @import url("../src/skin-xp.css"); body { background-color: #ccc; }</style>
    <script type="text/javascript">
      // WARNING: the following should be a path relative to site, like "/hmenu/"
      // here it is set relative to the current page only, which is not recommended
      // for production usage; it's useful in this case though to make the demo work
      // correctly on local systems.
      _dynarch_menu_url = "../src/";
    </script>
    <script type="text/javascript" src="../src/hmenu.js"></script>
  </head>
  <body onload="DynarchMenu.setup('menu', { electric: 1000, timeout: 0 });">
    <ul id="menu">
      <li>
        Item 1
        <ul>
          <li>SubItem 1.1</li>
          <li>
            SubItem 1.2
            <ul>
              <li>SubItem 1.2.1</li>
              <li>SubItem 1.2.2</li>
              <li>SubItem 1.2.3</li>
              <li>SubItem 1.2.4</li>
            </ul>
          </li>
          <li>
            SubItem 1.3
            <ul>
              <li>SubItem 1.3.1</li>
              <li>SubItem 1.3.2</li>
              <li>SubItem 1.3.3</li>
              <li>SubItem 1.3.4</li>
            </ul>
          </li>
          <li>SubItem 1.4</li>
        </ul>
      </li>
      <li>
        Item 2
        <ul>
          <li>SubItem 2.1</li>
          <li>
            SubItem 2.2
            <ul>
              <li>SubItem 2.2.1</li>
              <li>SubItem 2.2.2</li>
              <li>SubItem 2.2.3</li>
              <li>SubItem 2.2.4</li>
            </ul>
          </li>
          <li>SubItem 2.3</li>
          <li>SubItem 2.4</li>
        </ul>
      </li>
    </ul>
    <blockquote>
      <p>
        The above menu defines 2 custom timeouts.  The “electric”
        parameter is set to 1000, which means that all menus will close
        if the mouse was outside for 1 second (1000 milliseconds), and
        the “timeout” parameter is set to 0 which means that submenus
        will open instantly when the mouse hovers an item that has a
        submenu.
      </p>
      <p>
        The default values are:
      </p>
      <ul>
        <li>
          <tt>electric</tt> = <tt>false</tt> (which means that the menu
          won't show “electric” behavior, so items in the toplevel menu
          bar require a click in order to display submenus.
        </li>
        <li>
          <tt>timeout</tt> = <tt>150</tt> milliseconds, which we figured
          out to be a sane value for opening submenus on “mouseover”.
        </li>
      </ul>
    </blockquote>
  </body>
</html>
<!--
-->
